//
//  HYDateHandle.h
//  Agency
//
//  Created by Jack on 2017/11/21.
//  Copyright © 2017年 胡勇. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface HYDateHandle : NSObject

+ (NSDate *)dateFromString:(NSString *)dateStr format:(NSString *)format;

/**
 *  将时间戳转换成昨天，前天，周一等
 */
+ (NSString *)distanceTimeWithBeforeTime:(long)beforeTimestamp;

/** 获取当前时间得星期 */
+ (NSString *)weekStrFromDate:(NSDate *)currentDate;

/** 获取当前时间得星期 */
+ (NSString *)weekStrFromDateComponents:(NSDateComponents *)dateComponents;

/** 获取距离当前日期的字符串 yyyy-mm-dd */
+ (NSString *)getCurrentDateStrYYYYMMDDWithTimeInterval:(NSInteger)timeInterval;

/** 获取距离当前日期的字符串 yyyy-mm-dd HH:mm */
+ (NSString *)getCurrentDateStrYYYYMMddHHmmWithTimeInterval:(NSInteger)timeInterval;

/** 获取距离当前日期的字符串 yyyy-mm-dd HH:mm:ss */
+ (NSString *)getCurrentDateStrYYYYMMddHHmmssWithTimeInterval:(NSInteger)timeInterval;

/** 获取距离当前时间的字符串 HH:mm */
+ (NSString *)getCurrentDateStrHHmmWithTimeInterval:(NSInteger)timeInterval;

/** 获取距离当前时间的字符串 dd MMM yyyy    27 Apr 2018 */
+ (NSString *)getCurrentDateStrDDMMYYYYWithTimeInterval:(NSInteger)timeInterval;

/** 获取指定时间的字符串 */
+ (NSString *)getDateStringWithDate:(NSDate *)date formater:(NSString *)formatterStr;

/**比较两个date是否相同*/
+ (BOOL)isSameWithDateA:(NSDate *)dataA dataB:(NSDate *)dataB formater:(NSString *)formatterStr;

@end
